package com.chenjian.designpattern.strategy.impl;

import com.chenjian.designpattern.strategy.AbstractStrategy;

/**
 * 策略模式具体策略角色
 * <p>
 * 具体的实现逻辑，例如算法和方案等
 *
 * @author TC2952
 */
public class Num02Discount extends AbstractStrategy {

    public Num02Discount() {
        super("num02");
    }

    /**
     * 抽象方法，具体策略执行逻辑
     *
     * @param num
     * @return
     */
    @Override
    public double doRes(double num) {
        System.out.println("执行num02");
        this.finalRes = num;
        return finalRes;
    }
}
